<include file="../Public/header" />
<!-- 主体内容 -->
<div id="content"  msgpage="atme" interface="list">
<include file="../Public/message_header" />
<php>if(empty($weibolist)) {</php>暂无更多信息<php>}</php>
<volist name="weibolist" id="feed">
	<php>if($feed['source_type'] == '评论') {</php>
		<div class="c_atme" isdig="{$feed.is_digg}" cid="{$feed.sourceInfo.feed_id}" commentid="{$feed.source_id}" rowid="{$feed[row_id]}" appid="{$feed.uid}" page="" type="comment" touid="{$feed[comment_user_info][uid]}" ccid="{$feed[source_id]}" isdel="{$feed.sourceInfo.api_source.is_del}" isdel2="{$feed.api_source.is_del}">
			<!-- 评论内容 -->
			<div class="c_info">
				<div class="c_ava">
					<img src="{$feed.comment_user_info.avatar_small}" width=40 height=40>
				</div>
				<div class="info_text">
					<div id="c_info_name_{$feed.row_id}" class="c_info_name">{$feed.comment_user_info.uname}</div>
				</div>
			</div>
			<div id="c_content_{$feed.feed_id}" class="c_content">
				<php>echo wapFormatContent($feed['content']);</php>
			</div>

			<!-- 原文 -->
			<div id="c_zf_box_{$feed.feed_id}" class="c_zf_box">
				<dt class="bgcolor_arrow"><em class="arrline">◆</em><span class="downline">◆</span></dt>
				<div class="c_zf_content">
					<span class="c_zf_content_name">@{$feed.source_user_info.uname}</span>:
						<php>echo wapFormatContent($feed['sourceInfo']['feed_content']);
							if($feed['sourceInfo']['type'] == 'weiba_post'){
						</php>
							<div class="loadweiba" weibaid="{$feed.sourceInfo.api_source.post_id}">
								查看全文
							</div>
						<php>
							}
						</php>
						<div class="c_zf_info">
							<div class="c_zf_info_time">{$feed.sourceInfo.publish_time|friendlyDate}</div>
							<div class="c_zf_info_counts">
								<span class="c_zf_info_count">赞:{$feed.sourceInfo.digg_count}</span>
								<span class="c_zf_info_count">转发:{$feed.sourceInfo.repost_count}</span>
								<span class="c_zf_info_count">评论:{$feed.sourceInfo.comment_count}</span>
						</div>
					</div>
				</div>
				<!-- 原文的图 -->
				<php>if($feed['sourceInfo']['type']=='postimage') {</php>
					<div class="feed_img_box">
						<php>foreach($feed['sourceInfo']['attach'] as $value){</php>
							<img bm="{$value['attach_middle']}" class="feed_img" src="{$value['attach_small']}">
						<php>}</php>
					</div>
					
				<php>}</php>

			<!-- 转发的原文 -->
			<php>if (($feed['sourceInfo']['type'] == 'repost' && $feed['sourceInfo']['api_source']['is_del'] == '0') || ($feed['type'] == 'repost' && $feed['transpond_data']['api_source']['is_del'] == '0')) {</php>
				<div id="c_zf_box_{$feed.feed_id}" class="c_zf_box">
					<dt class="bgcolor_arrow"><em class="arrline">◆</em><span class="downline">◆</span></dt>
					<div class="c_zf_content">
						<span class="c_zf_content_name">@{$feed.sourceInfo.transpond_data.uname}</span>:
						<php>
							echo wapFormatContent($feed['sourceInfo']['transpond_data'][feed_content]);
							if($feed['sourceInfo']['transpond_data']['type'] == 'weiba_post'){
						</php>
								<div class="loadweiba" weibaid="{$feed.sourceInfo.transpond_data.api_source.post_id}">
									查看全文
								</div>
						<php>
							}
						</php>
					</div>
				<!-- 转发的图 -->
				<php>if($feed['sourceInfo']['transpond_data']['type']=='postimage') {</php>
					<div class="feed_img_box">
						<php>foreach($feed['sourceInfo']['transpond_data']['attach'] as $value){</php>
							<img bm="{$value['attach_middle']}" class="feed_img" src="{$value['attach_small']}"/>
						<php>}</php>
					</div>
				<php>}</php>

				

				<!-- 附件 -->
				<div>
					<php>
						if(isset($feed['sourceInfo']['transpond_data']['attach']) && $feed['sourceInfo']['transpond_data']['type'] == 'postfile'){
					</php>
					<div class="attach_box">
						<php>foreach($feed['sourceInfo']['transpond_data']['attach'] as $value){
								switch($value['extension']){
									case 'png':$type='pic';break;
									case 'jpg':$type='pic';break;
									case 'jpeg':$type='pic';break;
									case 'bmp':$type='pic';break;
									case 'gif':$type='pic';break;
									case 'zip':$type='zip';break;
									case 'rar':$type='zip';break;
									case 'doc':$type='word';break;
									case 'docx':$type='word';break;
									case 'xls':$type='xls';break;
									case 'ppt':$type='ppt';break;
									case 'pdf':$type='pdf';break;
									default:$type='unknow';break;
								}
								$size=$value['size'];
								if($size > 1024 && $size< 1024*1024){
									$size=$size/1024;
									$size=round($size,2);
									$size.='K';
								}else if($size < 1024){
									$size.='B';
								}else{
									$size=$size/1024/1024;
									$size=round($size,2);
									$size.='M';
								}
						</php>
							<a class="attachs_a" href="{:U('widget/Upload/down',array('attach_id'=>$value['attach_id']))}" type="<php>echo $value['extension'];</php>">
								<div class="attachs" style="background-image:url(img/attach/{$type}.png)">
									<div class="attachs_name">
										<php>echo $value['attach_name'];</php>
									</div>
									<div class="attachs_size">
										<php>echo $size;</php>
									</div>
								</div>
							</a>
						<php>}</php>
					</div>
				  	<php>}</php>
				</div>
					<div class="c_zf_info">
						<div class="c_zf_info_time">{$feed.sourceInfo.transpond_data.publish_time|friendlyDate}</div>
						<div class="c_zf_info_counts">
							<span class="c_zf_info_count">转发:{$feed.sourceInfo.transpond_data.repost_count}</span>
							<span class="c_zf_info_count">评论:{$feed.sourceInfo.transpond_data.comment_count}</span>
							<span class="c_zf_info_count">赞:{$feed.sourceInfo.transpond_data.digg_count}</span>
						</div>
					</div>
				</div>
			<php>}elseif (($feed['sourceInfo']['type'] == 'repost' && $feed['sourceInfo']['api_source']['is_del'] == '1') || ($feed['type'] == 'repost' && $feed['transpond_data']['api_source']['is_del'] == '1')) {</php>
			<!-- 原微博已被删除 -->
			<div class="c_zf_box">
				<dt class="bgcolor_arrow"><em class="arrline">◆</em><span class="downline">◆</span></dt>
				<div class="c_zf_content">原文已被删除</div>
			</div>
			<php>}</php>

			<!-- 微吧转发 -->
			<php>if ($feed['sourceInfo']['type'] == 'weiba_repost' && $feed['sourceInfo']['api_source']['is_del'] == '0') {</php>
			<div id="c_zf_box_{$feed.feed_id}" class="c_zf_box">
				<dt class="bgcolor_arrow"><em class="arrline">◆</em><span class="downline">◆</span></dt>
				<div class="c_zf_content">
					<span class="c_zf_content_name">@{$feed.sourceInfo.api_source.source_user_info.uname}</span>:
					<php>echo wapFormatContent($feed['sourceInfo']['api_source']['source_content']);
						if($feed['sourceInfo']['type'] == 'weiba_repost'){
						</php>
							<div class="loadweiba" weibaid="{$feed.sourceInfo.api_source.post_id}">
								查看全文
							</div>
						<php>
						}
					</php>
				</div>
				<div class="c_zf_info">
					<div class="c_zf_info_time">{$feed.transpond_data.publish_time|friendlyDate}</div>
					<div class="c_zf_info_counts">
						<span class="c_zf_info_count">回复:{$feed.sourceInfo.api_source.reply_count}</span>
						<span class="c_zf_info_count">浏览:{$feed.sourceInfo.api_source.read_count}</span>
					</div>
				</div>
			</div>
			<php>}elseif($feed['sourceInfo']['type'] == 'weiba_repost' && $feed['sourceInfo']['api_source']['is_del'] == '1'){</php>
				<!-- 原微博已被删除 -->
				<div class="c_zf_box">
					<dt class="bgcolor_arrow"><em class="arrline">◆</em><span class="downline">◆</span></dt>
					<div class="c_zf_content">原文已被删除</div>
				</div>
			<php>}</php>
			
			</div>
		</div>
	<php>}elseif($feed['source_type'] == '微博'){</php>
		<div class="c_atme" isdig="{$feed.is_digg}" type="weibo" id="c_{$feed.feed_id}" cid="{$feed.feed_id}" rowid="{$feed.feed_id}" appid="{$feed.uid}" page="">
			<!-- 判断是否被收藏 -->
			<php>if($feed['favorited']==1){</php>
				<div class="sc sc_1" id="sc_{$feed.feed_id}" cid="{$feed.feed_id}" type="{$feed.app_row_table}"></div>
			<php>}else{</php>
				<div class="sc" id="sc_{$feed.feed_id}" cid="{$feed.feed_id}" type="{$feed.app_row_table}"></div>
			<php>}</php>
			<!-- 判断是否被赞 -->
			<php>if($_SESSION['mid']!=$feed['uid']){</php>
				<php>if($feed['is_digg']===1){</php>
					<div class="digg digged" id="digg_{$feed.feed_id}" data-cid="{$feed.feed_id}" type="{$feed.app_row_table}"></div>
				<php>}else{</php>
					<div class="digg" id="digg_{$feed.feed_id}" data-cid="{$feed.feed_id}" type="{$feed.app_row_table}"></div>
				<php>}</php>
			<php>}</php>
			<!-- 原微博 -->
			<div class="c_info">
				<div class="c_ava">
					<img src="{$feed.avatar_small}" width=40 height=40>
				</div>
				<div class="info_text">
					<div id="c_info_name_{$feed.feed_id}" class="c_info_name">{$feed.uname}</div>
					<div class="c_info_more_box">
						<div id="c_time_{$feed.feed_id}" class="c_time">{$feed.publish_time|friendlyDate}</div>
						<div class="c_digg_count">赞:{$feed.digg_count}</div>
						<div id="c_zf_count_{$feed.feed_id}" class="c_zf_count">转发：{$feed.repost_count}</div>
						<div id="c_comment_count_{$feed.feed_id}" class="c_comment_count">评论：{$feed.comment_count}</div>
					</div>
				</div>
			</div>
			<div id="c_content_{$feed.feed_id}" class="c_content">
				<php>echo wapFormatContent($feed['feed_content'])</php>
			</div>

			<!-- 原微博的图 -->
			<php>if($feed['feedType']=='postimage') {</php>
			<div id="feed_img_box_{$feed.feed_id}" class="feed_img_box">
				<php>foreach($feed['attach'] as $value){</php>
					<img bm="{$value['attach_middle']}" class="feed_img" src="{$value['attach_small']}" linkto="{:U('w3g/Index/detail',array('weibo_id'=>$feed['weibo_id']))}">
				<php>}</php>
			</div>
			<php>}</php>

			<!-- 转发 -->
			<php>if ($feed['type'] == 'repost' && $feed['api_source']['is_del'] == '0') {</php>
			<div id="c_zf_box_{$feed.feed_id}" class="c_zf_box">
				<dt class="bgcolor_arrow"><em class="arrline">◆</em><span class="downline">◆</span></dt>
				<div class="c_zf_content">
					<span class="c_zf_content_name">@{$feed.transpond_data.uname}</span>:
					<php>echo wapFormatContent($feed['transpond_data']['feed_content'])</php>
				</div>
				<!-- 转发的图 -->
				<php>if($feed['transpond_data']['type']=='postimage') {</php>
					<div class="feed_img_box">
						<php>foreach($feed['transpond_data']['attach'] as $value){</php>
							<img bm="{$value['attach_middle']}" class="feed_img" src="{$value['attach_small']}">
						<php>}</php>
					</div>
				<php>}</php>
					<div class="c_zf_info">
						<div class="c_zf_info_time">{$feed.transpond_data.publish_time|friendlyDate}</div>
						<div class="c_zf_info_counts">
							<span class="c_zf_info_count">赞:{$feed.transpond_data.digg_count}</span>
							<span class="c_zf_info_count">转发:{$feed.transpond_data.repost_count}</span>
							<span class="c_zf_info_count">评论:{$feed.transpond_data.comment_count}</span>
						</div>
					</div>
				<!-- 附件 -->
				<div><php>if(isset($feed['transpond_data']['attach']) && $feed['transpond_data']['type'] == 'postfile'){</php>
					<div class="attach_box">
						<php>foreach($feed['transpond_data']['attach'] as $value){
								switch($value['extension']){
									case 'png':$type='pic';break;
									case 'jpg':$type='pic';break;
									case 'jpeg':$type='pic';break;
									case 'bmp':$type='pic';break;
									case 'gif':$type='pic';break;
									case 'zip':$type='zip';break;
									case 'rar':$type='zip';break;
									case 'doc':$type='word';break;
									case 'docx':$type='word';break;
									case 'xls':$type='xls';break;
									case 'ppt':$type='ppt';break;
									case 'pdf':$type='pdf';break;
									default:$type='unknow';break;
								}
								$size=$value['size'];
								if($size > 1024 && $size< 1024*1024){
									$size=$size/1024;
									$size=round($size,2);
									$size.='K';
								}else if($size < 1024){
									$size.='B';
								}else{
									$size=$size/1024/1024;
									$size=round($size,2);
									$size.='M';
								}
						</php>
							<a class="attachs_a" href="{:U('widget/Upload/down',array('attach_id'=>$value['attach_id']))}" type="<php>echo $value['extension'];</php>">
								<div class="attachs" style="background-image:url(img/attach/{$type}.png)">
									<div class="attachs_name">
										<php>echo $value['attach_name'];</php>
									</div>
									<div class="attachs_size">
										<php>echo $size;</php>
									</div>
								</div>
							</a>
						<php>}</php>
					</div>
				  <php>}</php>
				</div>
			</div>
			<php>}elseif ($feed['type'] == 'repost' && $feed['api_source']['is_del'] == '1') {</php>
				<!-- 原微博已被删除 -->
				<div class="c_zf_box">
					<dt class="bgcolor_arrow"><em class="arrline">◆</em><span class="downline">◆</span></dt>
					<div class="c_zf_content">原文已被删除</div>
				</div>
			<php>}</php>

			<!-- 微吧转发 -->
			<php>if ($feed['type'] == 'weiba_repost' && $feed['api_source']['is_del'] == '0') {</php>
			<div id="c_zf_box_{$feed.feed_id}" class="c_zf_box">
				<dt class="bgcolor_arrow"><em class="arrline">◆</em><span class="downline">◆</span></dt>
				<div class="c_zf_content">
					<span class="c_zf_content_name">@{$feed.api_source.source_user_info.uname}</span>:
					<php>echo wapFormatContent($feed['api_source']['source_content']);
						if($feed['type'] == 'weiba_repost'){
						</php>
							<div class="loadweiba" weibaid="{$feed.api_source.post_id}">
								查看全文
							</div>
						<php>
						}
					</php>
				</div>
				<div class="c_zf_info">
					<div class="c_zf_info_time">{$feed.transpond_data.publish_time|friendlyDate}</div>
					<div class="c_zf_info_counts">
						<span class="c_zf_info_count">回复:{$feed.api_source.reply_count}</span>
						<span class="c_zf_info_count">浏览:{$feed.api_source.read_count}</span>
					</div>
				</div>
			</div>
			<php>}elseif($feed['type'] == 'weiba_repost' && $feed['api_source']['is_del'] == '1'){</php>
				<!-- 原微博已被删除 -->
				<div class="c_zf_box">
					<dt class="bgcolor_arrow"><em class="arrline">◆</em><span class="downline">◆</span></dt>
					<div class="c_zf_content">原文已被删除</div>
				</div>
			<php>}</php>

			
		</div>
	<php>}</php>
</volist>

	<!-- 分页 -->
	<div id="pager_box">
		<php>if(empty($_GET['page']) || $_GET['page']==1){</php>
			<a href="javascript:;" link="" id="prev" class="pager_child pager_p_n_none ">上一页</a>
		<php>}else{</php>
			<a href="javascript:;" link="{:U('w3g/Index/atme',array('page'=>$page-1))}" id="prev" class="pager_child pager_p_n ">上一页</a>
		<php>}</php>
		<select id="page_sel" class="pager_child">
			<php>
				$_GET['page']!=0?$get=$_GET['page']:$get=1;
				$_count = ceil($count/10);
				if($get<6){
					for($i=0;$i<($_count);$i++){
						$get==$i+1?$selected='selected="selected"':$selected='';
						if($i>9){
							break;
						}
			</php>
			<option value="{:U('w3g/Index/atme')}&page={$i+1}" <php>echo $selected;</php>>第{$i+1}页</option>
			<php>	}
				}elseif($get>=6){
					for($i=($get-5);$i<$get;$i++){
						$get==$i+1?$selected='selected="selected"':$selected='';
			</php>
			<option value="{:U('w3g/Index/atme')}&page={$i+1}" <php>echo $selected;</php>>第{$i+1}页</option>
			<php>	}</php>
			<php>	for($i=$get;$i<($get+5);$i++){
						$get==$i+1?$selected='selected="selected"':$selected='';
						if($i>$_count-1){
							break;
						}
			</php>
			<option value="{:U('w3g/Index/atme')}&page={$i+1}" <php>echo $selected;</php>>第{$i+1}页</option>
			<php>	}</php>
			<php>}</php>
			
		</select>
		<php>if($get == $_count) {</php>
			<a href="javascript:;" link="" id="next" class="pager_child pager_p_n_none">下一页</a>
		<php>}else{</php>
			<a href="javascript:;" link="{:U('w3g/Index/atme',array('page'=>$page+1))}" id="next" class="pager_child pager_p_n">下一页</a>
		<php>}</php>
	</div>
</div>
	<!-- 列表结束################################################################################################ -->
<include file="../Public/footer" />